<?php

$data = array();
$job_id = $_GET['job_id'];

$sql = "SELECT job_file FROM tb_job WHERE job_id='{$job_id}'";
$fetch = mysql_fetch_assoc(mysql_query($sql));
$data['success'] = false;
if($dbfunc->delete('tb_job',"job_id='{$job_id}'")){
    if(file_exists('job/'.$fetch['job_file'])) unlink ('job/'.$fetch['job_file']);
    $data['success'] = true;
}

echo json_encode($data);